import service from '../utils/request'

/**
 * @description: 侦测数
 */
export function getMonite() {
  return service({
    url: '/vehicle/daily/getMonite',
    method: 'GET',
  })
}

/**
 * @description: 日常侦测无人机列表&&历史回放无人机列表
 */
export function comdetect(data) {
  return service({
    url: '/vehicle/daily/list',
    method: 'POST',
    data,
  })
}

/**
 * @description: 日常侦测无人机列表&&历史回放无人机列表
 */
export function hisDroneDirect() {
  return service({
    url: '/vehicle/drone/hisDroneDirectDaily',
    method: 'get',
  })
}

/**
 * @description: 历史回放-无人机历史轨迹
 */
export function comdetail(params) {
  return service({
    url: '/vehicle/drone/detail',
    method: 'post',
    params,
  })
}

/**
 * @description:  驾驶舱-获取当前无人机前端未接收轨迹
 * @param {*} params
 */
export function hisDroneCoors(params) {
  return service({
    url: '/vehicle/drone/hisDroneCoors',
    method: 'GET',
    params,
  })
}

/**
 * @description: 设备经纬度
 * @return {*}
 */
export function getDeviceLoc(deviceId) {
  return service({
    url: `/vehicle/base/getDeviceLoc/${deviceId}`,
    method: 'GET',
  })
}

/**
 * @description: 设备列表
 * @return {*}
 */
export function getDeviceList() {
  return service({
    url: `/vehicle/base/listAllDevice`,
    method: 'GET',
  })
}

/**
 * @description: 定向设备水平角
 * @return {*}
 */
export function getdeviceAngle(data) {
  return service({
    url: `/vehicle/base/deviceAngle`,
    method: 'post',
    data,
  })
}

/**
 * @description: 定向设备水平角
 * @return {*}
 */
export function getcallDevice(data) {
  return service({
    url: `/vehicle/base/strike`,
    method: 'post',
    data,
  })
}

/**
 * @description: 白名单经纬度
 * @return {*}
 */
export function getDeviceInfo(deviceId) {
  return service({
    url: `/vehicle/base/getDeviceLoc/${deviceId}`,
    method: 'get',
  })
}

/**
 * @description: 白名单列表
 * @return {*}
 */
export function getwhiteList() {
  return service({
    url: `/vehicle/whiteDrone/queryDroneByPage`,
    method: 'post',
  })
}

/**
 * @description: 白名单添加
 * @return {*}
 */
export function addwhiteList(data) {
  return service({
    url: `/vehicle/whiteDrone/insert`,
    method: 'post',
    data,
  })
}

/**
 * @description: 白名单删除
 * @return {*}
 */
export function deletewhiteList(params) {
  return service({
    url: `/vehicle/whiteDrone/delete`,
    method: 'post',
    params,
  })
}

/**
 * @description: 定向反制设备手动指引
 * @return {*}
 */
export function manualInstruction(data) {
  return service({
    url: `/vehicle/base/auto`,
    method: 'POST',
    data,
  })
}
/**
 * @description: 开关定向不允许追踪
 * @trackDisable 0 不追踪，1 追踪
 * @deviceId 设备id
 * @return {*}
 */
export function openTrace(data) {
  return service({
    url: `/vehicle/base/openTrace`,
    method: 'POST',
    data,
  })
}
